package com.bpms;


import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bpms.common.BasicConnectionPool;
import com.bpms.common.CommonUtil;
import com.bpms.common.CreatSequenceID;
import com.bpms.common.DictValue;
import com.bpms.common.LoadConfigParam;
import com.bpms.common.ParamValue;
import com.bpms.esb.Service;
import com.service.uai.engine.comm.ATMServer;

public class InitServlet extends HttpServlet {
	// web.xml中的日志路径配置信息
	public static String RealPath = null;

	public void init(ServletConfig config) throws ServletException {
		super.init(config);
		ServletContext application = config.getServletContext();
		InitServlet.RealPath = application.getRealPath("/");
		try {
			LoadConfigParam.I();
			BasicConnectionPool.I();
			ParamValue.I();
			DictValue.I();
			Service.I();
			CreatSequenceID.I();
			ATMServer.I();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			CommonUtil.debug("InitServlet init Exception", e);
		}

	}

	public void destroy() {
		super.destroy();
	}

	public void doGet(HttpServletRequest httpservletrequest,
			HttpServletResponse httpservletresponse) throws ServletException,
			IOException {
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doGet(request, response);
	}

	private static final long serialVersionUID = 1L;
}
